<?php
/****************************/
// Image helper
// thaodx@gmail.com
/****************************/

function getThumbnail($size, $src){	
	$return = FARM_URL.$size.'/'.$src;
	return $return;
}
function getImage($src){
	$return = $src;
	if((strstr($src, 'http://') || strstr($src, 'https://')) && strstr($src, 'googleusercontent')){
		$return = preg_replace('/(.+)\/(.+)\.(.+)$/is', '$1/s0/$2.$3', $src);
	}
	else{
		$return = FARM_URL.'/'.$src;
	}
	return $return;
}